package com.ssy.lingxi.product.repository;

import com.ssy.lingxi.product.entity.OrderCommodity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 订单会员商品持久化层
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/8/2
 */
public interface OrderCommoditySoldRepository extends JpaRepository<OrderCommodity,Long>, JpaSpecificationExecutor<OrderCommodity> {

    List<OrderCommodity> findByCommodityIdAndType(Long commodityId, Integer type);

    List<OrderCommodity> findByType(Integer type);

}
